var a = getApp(), e = require("../../wxParse/wxParse.js");

Page({
    data: {},
    onLoad: function(a) {
        var e = this;
        e.setData({
            newId: a.newid
        }), e.getinitData(a.newid);
    },
    getinitData: function(t) {
        var n = this;
        wx.request({
            url: a.globalData.baseUrl + a.globalData.urlNewsDetail,
            data: {
                id: t
            },
            method: "POST",
            header: {
                "content-type": "application/x-www-form-urlencoded"
            },
            success: function(a) {
                var t = JSON.parse(a.data);
                if (0 == t.code) {
                    var i = t.n;
                    n.setData({
                        news: t.n
                    }), e.wxParse("article", "html", i.content, n, 5);
                } else wx.showToast({
                    title: "请求失败",
                    icon: "none",
                    duration: 2e3
                });
            }
        });
    },
    onShareAppMessage: function() {}
});